<login>
<?php
	function curPageURL() {
		$pageURL = 'http';
		$pageURL .= "://";
		if ($_SERVER["SERVER_PORT"] != "80") {
			$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
		} else {
			$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
		}
	return $pageURL;
	}
	?>

	<?php 
		session_start();
		$_SESSION['url'] = curPageURL();
		if (isset($_SESSION['NOM'])){
			if ($_SESSION['NOM']<>''){
				echo "Bonjour ".$_SESSION ['NOM']. " - <a href='login.php'>Déconnection</a>";
			}
		}else{
			echo "<form action = 'login.php' method='POST'>";
				echo "<label for='user'>Matricule:</label>";
				echo "<input class='text' name='user' type='text'/>   ";
				echo "<label for='pass'>Mot de passe:</label>";
				echo "<input class='text' name='pass' type='password'/>";
				echo "<input class='button' type='submit'>";
			echo "</form>";
		}
	?>
</login>
<imag>
	<img src='./image/logo.png' />
</imag>
<header>
	<br>
	<div class='test'>
		<h1><a href='index.php'>Médiathèque</a></h1>
		<h2>du CEGEP de Trois-Rivières</h2>
	</div>
</header>
<headerRecherche>
	 <form>
		<label for='rechercheRapide'>Recherche:</label>
		<input name='rechercheRapide' type='text' value=''/>
		<input type='button' value='Rechercher' onclick='if (onclk()) { document.myform.submit()}'/>
	</form>
</headerRecherche>